/* @(#)GSBargainViewAction.java    V0.1
 *
 * Project: GSdevelop
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   owen         2006-4-21
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.action;

import java.util.ArrayList;

import com.hitrust.gs.bean.GSBargainBean;
import com.hitrust.gs.business.GSBargainProcessor;
import com.hitrust.gs.form.GSBargainAddForm;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;

/**
 * 显示合同详细信息
 */
public class GSBargainViewAction extends GSBaseAction{

    public String execute(GSBaseForm aForm) throws Exception {
        GSBargainAddForm tForm = (GSBargainAddForm)aForm;
        try{
        String tStatus=aForm.getRequest().getParameter("status");
        GSBargainBean tGSBargainBean=new GSBargainBean();
        ArrayList tArrayList =new ArrayList();
        tGSBargainBean=GSBargainProcessor.getBargainDetail(tForm.getGs_bgn_id());
        tArrayList=GSBargainProcessor.getBargainCharge(tForm.getGs_bgn_id());
        
        aForm.getRequest().setAttribute("BargainBean", tGSBargainBean);
        aForm.getRequest().setAttribute("BargainChargeList", tArrayList);
        aForm.getRequest().setAttribute("status", tStatus);
        }
        catch(Exception e){
            tForm.getRequest().setAttribute("action","A170201.do");
            throw e;
        }
        return GSBaseConstants.FORWARD_SUCCESS;
    }

}
